package coderead.agent.jvmtool;


import javassist.CannotCompileException;
import javassist.NotFoundException;

import java.lang.reflect.InvocationTargetException;
import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.Map;


public interface ToolService  extends Remote {

    //  查找类
    String findClassName(String name) throws RemoteException;
    //  反编译类
    String jadClass(String className) throws RemoteException;

    String getClassAllMethods(String className , String arg) throws RemoteException ;

    //修改指定类下的方法 不能带参数
    String modfiymethod(String className , String methodname , String[] befor , String[] after) throws RemoteException, NotFoundException, CannotCompileException, ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InstantiationException, InvocationTargetException;

    //还原方法
    String recovermethod(String targetclassName , String methodname) throws RemoteException, ClassNotFoundException, IllegalAccessException, InstantiationException, NoSuchMethodException, InvocationTargetException ;

    Long getClasssize(String classname) throws RemoteException, IllegalAccessException, InstantiationException;

    String getCurrliveObject(String classname) throws ClassNotFoundException,RemoteException;

    //获取某个实例类的属性
    String getClassAttributes(String classname) throws ClassNotFoundException, RemoteException, IllegalAccessException;
}
